package grgu.rud.glava1.b6;

import java.util.Scanner;

public class Trezn {

	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		System.out.print("Enter the amount of numbers: ");
		int n = sc.nextInt();
		int[] arr = new int[n];
		System.out.print("Enter the three-digit numbers ");
		for (int i = 0; i < arr.length; i++) {			
			arr[i] = sc.nextInt();
		}
		System.out.print("All three-digit number whose decimal digits are not the same: ");
		int[] arrTemp = new int[3];
		for (int i = 0; i < arr.length; i++) {	
			arrTemp[0] = arr[i]%10;
			arrTemp[1] = (arr[i]%100 - arrTemp[0])/10;
			arrTemp[2] = (arr[i] - arrTemp[1] - arrTemp[2])/100; 			
			if(arrTemp[0]!=arrTemp[1] && arrTemp[0]!=arrTemp[2] && arrTemp[1]!=arrTemp[2]){
				System.out.print(arr[i]+" ");
			}
		}
	}

}
